package com.beyondsoft.common.core.exchange.sender;

import com.beyondsoft.common.core.sys.initialization.RabbitConfig;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 远程服务通知主服务执行完毕
 */
@Component
public class SubToMainSender {
    @Autowired
    private AmqpTemplate rabbitTemplate;

    public void send(String packageKey) {
        System.out.println("发送服务执行成功通知");
        this.rabbitTemplate.convertAndSend(RabbitConfig.STATE_QUEUE, packageKey);
    }

}
